package unit6;

public class DoubleLinkedListTest4 {

    public static void main(String[] args) {
        DoubleLinkedList linkedList = new DoubleLinkedList() ;
        System.out.println("添加数据前");
        linkedList.list();
        StudentNode2 node1 = linkedList.findByNo(linkedList.getHead(), 3);
        System.out.println(node1);
        /*
         * linkedList.add(new StudentNode2(1, "tom")); linkedList.add(new
         * StudentNode2(3, "lucy")); linkedList.add(new StudentNode2(2, "lily"));
         */
        linkedList.addByOrder(new StudentNode2(1, "tom"));
        linkedList.addByOrder(new StudentNode2(3, "lucy"));
        linkedList.addByOrder(new StudentNode2(2, "lily"));
        System.out.println("添加数据后");
        linkedList.list();


        linkedList.modify(new StudentNode2(3, "刘德华"));
        linkedList.list();
        System.out.println("删除前：");
        linkedList.delete(2);
        System.out.println("删除后：");
        linkedList.list();


    }

}
